
import { Injectable } from '@angular/core';
import { ViewModel, NgCommand } from '@farris/devkit';
import { Observable } from 'rxjs';

@Injectable()
export class DataGridComponentViewmodel extends ViewModel {
    public bindingPath = '/';
    // farrisDataGrid列集合定义 在对应component中赋值
    public dataGridColumns:any;
    // datGrid 列集合名称 用以bindData使用
    public dataGridColumnsName:string;

    public dom = {
  "dataGrid": {
    "type": "DataGrid",
    "resourceId": "dataGrid",
    "visible": {
      "useQuote": false,
      "isExpression": false,
      "value": true
    },
    "id": "dataGrid",
    "size": {},
    "readonly": {
      "useQuote": false,
      "isExpression": false,
      "value": false
    },
    "fields": [
      {
        "type": "GridField",
        "resourceId": "merchantName_251ab68d_97tw",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "merchantName_251ab68d_97tw",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "merchantName",
          "fullPath": "MerchantName",
          "isExpression": false,
          "value": "merchantName"
        },
        "dataField": "merchantName",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "商户名称",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "resizeable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "merchantCode_5735ce79_aqwh",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "merchantCode_5735ce79_aqwh",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "merchantCode",
          "fullPath": "MerchantCode",
          "isExpression": false,
          "value": "merchantCode"
        },
        "dataField": "merchantCode",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "商户编号",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "resizeable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "merchantType_b2ab388b_expt",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "merchantType_b2ab388b_expt",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "merchantType",
          "fullPath": "MerchantType",
          "isExpression": false,
          "value": "merchantType"
        },
        "dataField": "merchantType",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "商户类型",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "resizeable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "companyType_cff1ac47_5v0w",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "companyType_cff1ac47_5v0w",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "companyType",
          "fullPath": "CompanyType",
          "isExpression": false,
          "value": "companyType"
        },
        "dataField": "companyType",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "企业类型",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "fullName_f72e9ecc_xmsh",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "fullName_f72e9ecc_xmsh",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "fullName",
          "fullPath": "FullName",
          "isExpression": false,
          "value": "fullName"
        },
        "dataField": "fullName",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "企业全称",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "businessLicense_71358eec_16ek",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "businessLicense_71358eec_16ek",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "businessLicense",
          "fullPath": "BusinessLicense",
          "isExpression": false,
          "value": "businessLicense"
        },
        "dataField": "businessLicense",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "营业执照编码",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "address_52858192_hefs",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "address_52858192_hefs",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "address",
          "fullPath": "Address",
          "isExpression": false,
          "value": "address"
        },
        "dataField": "address",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "商户地址",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "email_bb475838_9uby",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "email_bb475838_9uby",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "email",
          "fullPath": "Email",
          "isExpression": false,
          "value": "email"
        },
        "dataField": "email",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "邮箱",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "telephone_d6a28030_6hp0",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "telephone_d6a28030_6hp0",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "telephone",
          "fullPath": "Telephone",
          "isExpression": false,
          "value": "telephone"
        },
        "dataField": "telephone",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "联系电话",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      },
      {
        "type": "GridField",
        "resourceId": "adminstrator_4861b4e2_w0cu",
        "visible": {
          "useQuote": false,
          "isExpression": false,
          "value": true
        },
        "id": "adminstrator_4861b4e2_w0cu",
        "size": {
          "width": 120
        },
        "readonly": {
          "useQuote": false,
          "isExpression": false,
          "value": false
        },
        "binding": {
          "type": "Form",
          "path": "adminstrator",
          "fullPath": "Adminstrator",
          "isExpression": false,
          "value": "adminstrator"
        },
        "dataField": "adminstrator",
        "dataType": "string",
        "multiLanguage": false,
        "caption": "管理员",
        "draggable": false,
        "frozen": "none",
        "sortable": true,
        "aggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "groupAggregate": {
          "type": "none",
          "formatter": {
            "type": "none"
          }
        },
        "linkedLabelEnabled": false,
        "updateOn": "blur",
        "formatter": {
          "type": "none"
        }
      }
    ],
    "multiSelect": false,
    "showLineNumber": false,
    "lineNumberTitle": "#",
    "groupTotalText": "Total",
    "filterable": false,
    "groupable": false,
    "rowClass": ""
  }
};
    @NgCommand({
        name: 'ChangePage1',
        params: {
            loadCommandName: 'Filter1',
            loadCommandFrameId: 'root-component'
        },
        paramDescriptions: {
            loadCommandName: { type: 'string' },
            loadCommandFrameId: { type: 'string' }
        }
    })
    public ChangePage1(commandParam?: any): Observable<any> { return; }

}